﻿(function (wtm) {
    wtm.button_Render = function (para) {
        var $btn = $('#' + para.id);

        $btn.on('click', function (event) {
            if (para.click.length > 0) {
                if (para.confirmTxt.length > 0) {
                    layui.layer.confirm(para.confirmTxt, { icon: 3, title: para.info }, function (index) {
                        eval(para.click + '(this,event)');
                        layui.leyer.close(index);
                    });
                }
                else {
                    eval(para.click + '(this,event)');
                }
            }
            return false;
        });
    };
})(wtm);
